<template>
	
		<view class="intro-container">

			<view v-for="item in teamItem" :key="item._id" class="sign-box" @click="toTeamDoctors(item._id)" style="margin-left: 30rpx; margin-right: 30rpx;">
				<image :src="item.avatar" mode="" style="width: 160rpx; height: 160rpx;"></image>
				<view class="" style="display: flex; justify-content: space-between; align-items: center;">
					<view style="	display: flex;
									flex-direction:column;
									justify-content: space-between;
									align-items: flex-start;
									height: 200rpx;
									flex: 1;
									margin-left: 40rpx;
									">
						<text class="sign-text">{{item.name}}</text>
						<view class="signTop-text2">{{ item.organizationId?.name }}</view>
						<view class="sign-img">
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<span class="yellow-span">5.o</span>
						</view>
						
					</view>
					<image src="/static/icons/u1334.png" mode="" class="hostpital-box-image" style=""></image>
				</view>
			</view>
</view>
</template>

<script setup>
import { ref } from 'vue';
import {onLoad} from '@dcloudio/uni-app';
import { useUserStore } from '../../../store/user';
import { contractedTeamApi } from '../../../api/teamDoctor';
	
const UserStore =useUserStore()
	
	const teamItem = ref([]);
	
onLoad(()=>{
	getTeam()
})	
	
	function getTeam() {
		contractedTeamApi({
				residentId: UserStore.userInfo._id
			})
			.then(res => {
				if (res.code == 200) {
					console.log(res,'数据');
					teamItem.value = res.data;
					console.log(teamItem.value);
				}
			})
	}	
	
	
	//跳转至团队详情页面
	function toTeamDoctors(_id){
		uni.navigateTo({
			url:`/minePackage/pages/Team-of-doctors/Team-of-doctors?_id=${_id}`
		})
	}
	
</script>

<style scoped lang="scss"> 
	.sign-box {
		height: 268rpx;
		 border-radius: 12rpx; 
		display: flex;
		align-items: center;
		background-color: rgba(255, 255, 255, 1);
		margin: 20rpx auto;
		padding-left: 20rpx;
		border: 1px solid rgba(255, 255, 255, 1);
	}
	
	.sign-box-1 {
		height: 268rpx;
		border: 1px solid #eee;
		display: flex;
		align-items: center;
		background-color: rgba(255, 255, 255, 1);
		margin: 20rpx auto 40rpx;
		padding-right: 30rpx;
		padding-left: 30rpx;
	}
	
	.signColor {
		background-color: #f6fafd;
	}
	
	.signTop {
		display: flex;
		padding-top: 40rpx;
	}
	
	.scroll-Y {
		position: absolute;
		top: 0;
		height: 100%;
		background-color: #f6fafd;
	}
	
	.yellow-span {
		color: #FDDB78;
		font-size: 28rpx;
		line-height: 56rpx;
	
	}
	.hostpital-box-image {
		width: 22rpx;
		height: 22rpx;
	}
	.signTop-text {
		font-weight: 1000rpx;
		font-style: normal;
		font-size: 36rpx;
		line-height: 56rpx;
	
	}
	
	.sign-img {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-left: -10rpx;
	}	
	.intro-container {
		margin: 50rpx 20rpx 50rpx;
		background-color: #f6fafd;
		height: 100vh;
	}
	
	
	.signTop-text2 {
		font-size: 24rpx;
		color: #999999;
		line-height: 27px;
		width: 400rpx;
		height: 54rpx;
	}
	.sign-text {
		font-weight: 400;
		font-style: normal;
	}       
</style>
